// **********************************************************************
//
// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
//
// **********************************************************************

// Ice version 3.3.0

package CommProxy;

public final class NodeInfo implements java.lang.Cloneable
{
    public String ident;

    public String msgID;

    public String nodeKind;

    public NodeInfo()
    {
    }

    public NodeInfo(String ident, String msgID, String nodeKind)
    {
        this.ident = ident;
        this.msgID = msgID;
        this.nodeKind = nodeKind;
    }

    public boolean
    equals(java.lang.Object rhs)
    {
        if(this == rhs)
        {
            return true;
        }
        NodeInfo _r = null;
        try
        {
            _r = (NodeInfo)rhs;
        }
        catch(ClassCastException ex)
        {
        }

        if(_r != null)
        {
            if(ident != _r.ident && ident != null && !ident.equals(_r.ident))
            {
                return false;
            }
            if(msgID != _r.msgID && msgID != null && !msgID.equals(_r.msgID))
            {
                return false;
            }
            if(nodeKind != _r.nodeKind && nodeKind != null && !nodeKind.equals(_r.nodeKind))
            {
                return false;
            }

            return true;
        }

        return false;
    }

    public int
    hashCode()
    {
        int __h = 0;
        if(ident != null)
        {
            __h = 5 * __h + ident.hashCode();
        }
        if(msgID != null)
        {
            __h = 5 * __h + msgID.hashCode();
        }
        if(nodeKind != null)
        {
            __h = 5 * __h + nodeKind.hashCode();
        }
        return __h;
    }

    public java.lang.Object
    clone()
    {
        java.lang.Object o = null;
        try
        {
            o = super.clone();
        }
        catch(CloneNotSupportedException ex)
        {
            assert false; // impossible
        }
        return o;
    }

    public void
    __write(IceInternal.BasicStream __os)
    {
        __os.writeString(ident);
        __os.writeString(msgID);
        __os.writeString(nodeKind);
    }

    public void
    __read(IceInternal.BasicStream __is)
    {
        ident = __is.readString();
        msgID = __is.readString();
        nodeKind = __is.readString();
    }
}
